/*****************************************************************************
 * $LastChangedDate: 2012-10-25 21:35:57 -0400 (Thu, 25 Oct 2012) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Base class for manipulator (OSG specific).
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef VIEW_MANIPULATOR_HH
#define VIEW_MANIPULATOR_HH 1

#include <osg/Version>
#if OPENSCENEGRAPH_MAJOR_VERSION*100 + OPENSCENEGRAPH_MINOR_VERSION*10 + OPENSCENEGRAPH_PATCH_VERSION >= 298
#   include <osgGA/CameraManipulator>
#   define MatrixManipulator CameraManipulator
#else
#   include <osgGA/MatrixManipulator>
#endif
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>

namespace view {

////////////////////////////////////////////////////////////////////////////////
/// @brief Base class for manipulator (OSG specific).
///
/// A ManipulatorViewpoint can be composed with a Manipulator object.
///
class Manipulator : public osgGA::MatrixManipulator
{
protected:  // don't directly instantiate
                            Manipulator( void ) { }
    virtual                 ~Manipulator() { }

public:
// OSG-specific:
    virtual void            home( double currentTime ) { }
    virtual void            home( const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter& ) { }
    virtual bool            handle( const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter& ) { return false; }
    virtual void            setByMatrix( const osg::Matrixd& matrix ) = 0;
    virtual osg::Matrixd    getMatrix( void ) const = 0 /*suppress checks.sh*/ ;
    virtual void            setByInverseMatrix( const osg::Matrixd& matrix ) = 0;
    virtual osg::Matrixd    getInverseMatrix( void ) const = 0 /*suppress checks.sh*/;
};

} // namespace view

#endif // VIEW_MANIPULATOR_HH
